package com.htlwk.javapractice;

import java.util.Objects;

/**
 * @ClassName CarBean
 * @Description 测试而已
 * @Author liaowenxiong
 * @Date 2024/12/25 18:58
 * @Version 1.0
 */
public class CarBean {
    private String brand;
    private String name;
    private String price;

    public CarBean() {
    }

    public CarBean(String brand, String name, String price) {
        this.brand = brand;
        this.name = name;
        this.price = price;
    }

    @Deprecated
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CarBean carBean = (CarBean) o;
        return Objects.equals(brand, carBean.brand) && Objects.equals(name, carBean.name) && Objects.equals(price, carBean.price);
    }

    @Deprecated
    public int hashCode() {
        return Objects.hash(brand, name, price);
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
